import music from '../../unit/music.js';

let {
	hasWebAudioAPI
} = music;


let initState = true;
if (!hasWebAudioAPI.data) {
	initState = false;
}
export default {
	state: initState,
	music(state, payload) {
		if (!hasWebAudioAPI.data) { // 若浏览器不支持 WebAudioApi, 将无法播放音效
			state.music = false;
		}
		state.music = payload;
	}
};